import javax.swing.*;
import java.awt.*;
import java.io.*;

public class ScorePanel extends Canvas{
   public void paint(Graphics g){
       g.setFont(new Font("Serif",Font.BOLD ,12)) ;
   try{
     DataInputStream fout = new DataInputStream(new FileInputStream("scorefile"));
     int i=1;
      try{
        while(i<7){
          g.drawString("    " + (i++) + ".  " + fout.readUTF(),20,20*i);
          g.drawString("............................",150,20*i) ;
          String n = new Integer(fout.readInt()).toString();
          g.drawString(n  + "  Points\n",300,20*i);
        }
      }catch(EOFException ee){
  fout.close() ;
     }
   }catch(IOException e){}
  repaint();
   }
}
